Hello World in a Scala Notebook

This notebook is a first try with a Scala (Spark) kernel. Please be patient on execution of the first cell, it takes a little bit to get the kernel moving.

We can create a Scala program:


In [ ]:
object HelloWorld {
  def main(args: Array[String]) {
    println("Hello, world!")
  }
}

.. and execute it


In [ ]:
HelloWorld.main(null)

... but since this is a REPL environment, it is actually simpler to just start executing Scala code


In [ ]:
println( "Hello world" )

If you reached here without problems, it means the Scala kernel works.

Magics

The SPylon kernel kernel is providing the Scala execution environment. This kernel implements some cell & line magics; a list of those available can be obtained with the %lsmagic one


In [ ]:
%lsmagic

Among the magics, there is the possibility to execute Python or Javascript code in a cell:


In [ ]:
%%python

for k in range(10):
    print(k)

In [ ]: